<!DOCTYPE html>
<html>
    <head>
        <!-- 页面meta -->
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>传智健康</title>
        <meta name="description" content="传智健康">
        <meta name="keywords" content="传智健康">
        <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
        <!-- 引入样式 -->
        <link rel="stylesheet" href="/backend/plugins/elementui/index.css">
        <link rel="stylesheet" href="/backend/plugins/font-awesome/css/font-awesome.min.css">
        <link rel="stylesheet" href="/backend/css/style.css">
        <link rel="stylesheet" href="/backend/css/login.css">
        <style type="text/css">
            body{
                height: 100%;
                width: 100%;
                background: url(/backend/img/bg.jpg) no-repeat 0 0 /cover;
            }
            .redItem .el-form-item__label{
                color:black;
                font-weight: bold;
            }
        </style>
    </head>
    <body>
        <div id="app">
            <div style="display: inline-block;height: 100px;width:500px;position:absolute;left:0;top: 0;bottom: 0;right: 0;margin: auto;margin-top:260px;">
                <div style="text-align: center;margin-bottom:30px;color:darkgreen;padding-left:80px;">
                    <h1>传智健康后台管理系统</h1>
                </div>
            <el-form :model="formData" id="loginForm" action="/backend/login.do" method="post" status-icon ref="loginForm" label-width="100px" class="demo-ruleForm">
                <el-form-item class="redItem" label="用户名:">
                    <el-input name="username" v-model="formData.username" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item class="redItem" label="密码:">
                    <el-input name="password" type="password" v-model="formData.password" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click="submitForm()">提交</el-button>
                    <el-button @click="resetForm()">重置</el-button>
                </el-form-item>
            </el-form>
            </div>
        </div>
    </body>
    <!-- 引入组件库 -->
    <script src="/backend/js/vue.js"></script>
    <script src="/backend/plugins/elementui/index.js"></script>
    <script type="text/javascript" src="/backend/js/jquery.min.js"></script>
    <script src="/backend/js/axios-0.18.0.js"></script>
<script>
    var vue = new Vue({
        el: '#app',
        data:{
            formData: {}
        },
        //钩子函数，VUE对象初始化完成后自动执行
        created() {
        },
        methods: {
            submitForm(){
                document.getElementById("loginForm").submit();
            },
            resetForm(){
                this.formData={};
            }
        }
    })
</script>
</html>
